/* 返回顶部 */
var backTop = function(c) {
	function a() {
		d.style.display = e.scrollTop ? "block" : "none";
	}
	var d = document.getElementById(c), e = document.documentElement;
	window.onscroll = a;
	d.onclick = function() {
		d.style.display = "none";
		window.onscroll = null;
		this.timer = setInterval(function() {
			e.scrollTop -= Math.ceil(e.scrollTop * 0.1);
			if (e.scrollTop == 0)
				clearInterval(d.timer, window.onscroll = a);
		}, 10);
		for ( var c = this.offsetTop, f = 0; f < 20; f++)
			setTimeout("scrollBy(0,-" + parseInt(c / 20) + ")", f * 50 + 1);
		return !1;
	};
};

function DOMReady(f){
  if (/(?!.*?compatible|.*?webkit)^mozilla|opera/i.test(navigator.userAgent)){ // Feeling dirty yet?
    document.addEventListener("DOMContentLoaded", f, false);
  }  else {
    window.setTimeout(f,0);
  }
}

DOMReady(function(){
	backTop("gotop");
});